#include "cthread.h"

CThread::CThread(QObject *parent)
    : QThread{parent}
{

}

void CThread::startThread()
{
    running = true;
    start();
}

void CThread::stopThread()
{
    running = false;
}

void CThread::run()
{
    int step = 0;
    while (running) {
        step++;
        emit threadValue(step);
        msleep(1000);
    }
    quit();
}
